#include <iostream>

using namespace std;

char ismirror(char x)
{
	switch (x)
	{
		case 'A': return 'A';
		case 'E': return '3';
		case 'H': return 'H';
		case 'I': return 'I';
		case 'J': return 'L';
		case 'L': return 'J';
		case 'M': return 'M';
		case 'O': return 'O';
		case 'S': return '2';
		case 'T': return 'T';
		case 'U': return 'U';
		case 'V': return 'V';
		case 'W': return 'W';
		case 'X': return 'X';
		case 'Y': return 'Y';
		case 'Z': return '5';
		case '1': return '1';
		case '2': return 'S';
		case '3': return 'E';
		case '5': return 'Z';
		case '8': return '8';
		default: return '!';
	}
}

bool mirror(string s)
{
	for (int i = 0, j = s.size()-1; i <= j; i++, j--)
		if (ismirror(s[i]) != s[j]) return false;
	return true;
}

bool palindrome(string s)
{
	for (int i = 0, j = s.size()-1; i < j; i++, j--)
		if (s[i] != s[j]) return false;
	return true;
}

int main()
{
	string s;
	while (cin >> s)
	{
		bool m = mirror(s), p = palindrome(s);

		if (m)
		{
			if (p) cout << s << " -- is a mirrored palindrome." << endl;
			else cout << s << " -- is a mirrored string." << endl;
		}
		else
		{
			if (p) cout << s << " -- is a regular palindrome." << endl;
			else cout << s << " -- is not a palindrome." << endl;
		}

		cout << endl;
	}
	return 0;
}
